<!DOCTYPE html>
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="css/NewTestList.css">
		<script type="text/javascript" src="JQuery/jquery-1.9.0.min.js"></script>
		<script type="text/javascript" src="JQuery/jquery-ui-1.10.0.custom.js"></script>		
		<link rel="stylesheet" type="text/css" href="css/smoothness/jquery-ui-1.10.0.custom.css" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<script type="text/javascript" src="JS/NewTestList.js"></script>
	
		
		<title>Page Title</title>
	</head>
	<body>
		<div id="TestListMain">
		<?php
		require_once('webservices.php');
		require_once('session_handler.php');
        
		session_handler_start();
		
		$Tests = Get_new_test($_SESSION['userid']);
		echo '<div id="TestListTable">';
		echo '<div class="TestRow HeaderRow">';
		echo '<span class="NameCol header">Test Name</span>';;
		echo '<span class="STimeCol header">Start Time</span>';
		echo '<span class="ETimeCol header">End Time</span>';		
		echo '</div><br/>';
		
	

		foreach($Tests as $Test)
		{
			echo '<div class="TestRow panelbox">';
				echo '<div class="Panel">';
					echo '<span class="NameCol ColumnGrade"><a href="TestTakingPreview.php?trid=' . $Test['id'] . '" >'  . $Test['name'] . '</a></span>';
					echo '<span class="STimeCol ColumnGrade">' . $Test['StartDate'] . '</span>';
					echo '<span class="ETimeCol ColumnGrade">' . $Test['EndDate'] . '</span>';
					echo '<img src="images/arrow-down.png" class="sectionarrow"/>';
				echo '</div>';
				echo '<span class="sectioncontent">';
					echo '<br/>';
					echo '<span class="header Details" id="DescHeader">Description</span><span class="DescCol">' . $Test['description'] . '</span>';
					echo '<br/><br/><span class="header Details" >Test Length</span><span class="DescCol">' . $Test['given_time'] . ' minutes</span>';
					echo '<br/><br/>';
				echo '</span>';
			echo '</div>';
		
			// echo '<h3>';
			// echo '<div class="TestRow">';
			// echo '<span class="NameCol"><a href="TestTaking.php?trid=' . $Test['id'] . '" >'  . $Test['name'] . '</a></span>';
			// echo '<span class="STimeCol">' . $Test['StartDate'] . '</span>';
			// echo '<span class="ETimeCol">' . $Test['EndDate'] . '</span>';
			// echo '<span class="TakeTestCol"><img src="images/taketest.png" class="TakeTestIcon" id="' . $Test['id'] . '" /></span>';
			// echo '</div>';
			// echo '</h3>';
			// echo '<div>';
				// echo '<span class="header">Description</span><span class="DescCol">' . $Test['description'] . '</span>';
				
				// echo '<br/><br/><span class="header">Test Length</span><span class="DescCol">' . $Test['given_time'] . ' minutes</span>';
			// echo '</div>';
		}
		echo '</div>';

		
		?>
		</div>
	</body>
			
</html>
